In computing, a word is any processor design's natural unit of data. A word is a fixed-sized datum handled as a unit by the instruction set or the hardware of the processor. The number of or digits in a word (the word size, word width, or word length) is an important characteristic of any specific processor design or computer architecture.
The size of a word is reflected in many aspects of a computer's structure and operation; the majority of the registers in a processor are usually word-sized and the largest datum that can be transferred to and from the computer memory in a single operation is a word in many (not all) architectures. The largest possible Memory address size, used to designate a location in memory, is typically a hardware word (here, "hardware word" means the full-sized natural word of the processor, as opposed to any other definition used).
Documentation for older computers with fixed word size commonly states memory sizes in words rather than bytes or characters. The documentation sometimes uses correctly, sometimes with rounding, e.g., 65 kilowords (kW) meaning for 65536 words, and sometimes uses them incorrectly, with kilowords (kW) meaning 1024 words (210) and megawords (MW) meaning 1,048,576 words (220). With standardization on 8-bit bytes and byte addressability, stating memory sizes in bytes, kilobytes, and megabytes with powers of 1024 rather than 1000 has become the norm, although there is some use of the IEC .
Several of the earliest computers (and a few modern as well) use binary-coded decimal rather than plain Binary number, typically having a word size of 10 or 12 decimal digits, and some early have no fixed word length at all. Early binary systems tended to use word lengths that were some multiple of 6-bits, with the 36-bit word being especially common on mainframe computers. The introduction of ASCII led to the move to systems with word lengths that were a multiple of 8-bits, with 16-bit machines being popular in the 1970s before the move to modern processors with 32 or 64 bits. Special-purpose designs like digital signal processors, may have any word length from 4 to 80 bits.
The size of a word can sometimes differ from the expected due to backward compatibility with earlier computers. If multiple compatible variations or a family of processors share a common architecture and instruction set but differ in their word sizes, their documentation and software may become notationally complex to accommodate the difference (see Size families below).
Character size was in the past (pre-variable-sized character encoding) one of the influences on unit of address resolution and the choice of word size. Before the mid-1960s, characters were most often stored in six bits; this allowed no more than 64 characters, so the alphabet was limited to upper case. Since it is efficient in time and space to have the word size be a multiple of the character size, word sizes in this period were usually multiples of 6 bits (in binary machines). A common choice then was the 36-bit word, which is also a good size for the numeric properties of a floating point format.
After the introduction of the IBM System/360 design, which uses eight-bit characters and supports lower-case letters, the standard size of a character (or more accurately, a byte) becomes eight bits. Word sizes thereafter are naturally multiples of eight bits, with 16, 32, and 64 bits being commonly used.
Most of these machines work on one unit of memory at a time and since each instruction or datum is several units long, each instruction takes several cycles just to access memory. These machines are often quite slow because of this. For example, instruction fetches on an IBM 1620 Model I take 8 cycles (160 μs) just to read the 12 digits of the instruction (the Model II reduced this to 6 cycles, or 4 cycles if the instruction did not need both address fields). Instruction execution takes a variable number of cycles, depending on the size of the operands.
When byte processing is to be a significant part of the workload, it is usually more advantageous to use the byte, rather than the word, as the unit of address resolution. Address values which differ by one designate adjacent bytes in memory. This allows an arbitrary character within a character string to be addressed straightforwardly. A word can still be addressed, but the address to be used requires a few more bits than the word-resolution alternative. The word size needs to be an integer multiple of the character size in this organization. This addressing approach was used in the IBM 360, and has been the most common approach in machines designed since then.
When the workload involves processing fields of different sizes, it can be advantageous to address to the bit. Machines with bit addressing may have some instructions that use a programmer-defined byte size and other instructions that operate on fixed data sizes. As an example, on the IBM 7030 ("Stretch"), a floating point instruction can only address words while an integer arithmetic instruction can specify a field length of 1-64 bits, a byte size of 1-8 bits and an accumulator offset of 0-127 bits.
In a byte-addressable machine with storage-to-storage (SS) instructions, there are typically move instructions to copy one or multiple bytes from one arbitrary location to another. In a byte-oriented (byte-addressable) machine without SS instructions, moving a single byte from one arbitrary location to another is typically:
Individual bytes can be accessed on a word-oriented machine in one of two ways. Bytes can be manipulated by a combination of shift and mask operations in registers. Moving a single byte from one arbitrary location to another may require the equivalent of the following:
Alternatively many word-oriented machines implement byte operations with instructions using special byte pointers in registers or memory. For example, the PDP-10 byte pointer contained the size of the byte in bits (allowing different-sized bytes to be accessed), the bit position of the byte within the word, and the word address of the data. Instructions could automatically adjust the pointer to the next byte on, for example, load and deposit (store) operations.
In the mid-1970s, DEC designed the VAX to be a 32-bit successor of the 16-bit PDP-11. They used word for a 16-bit quantity, while longword referred to a 32-bit quantity; this terminology is the same as the terminology used for the PDP-11. This was in contrast to earlier machines, where the natural unit of addressing memory would be called a word, while a quantity that is one half a word would be called a halfword. In fitting with this scheme, a VAX quadword is 64 bits. They continued this 16-bit word/32-bit longword/64-bit quadword terminology with the 64-bit DEC Alpha.
Another example is the x86 family, of which processors of three different word lengths (16-bit, later 32- and 64-bit) have been released, while word continues to designate a 16-bit quantity. As software is routinely Porting from one word-length to the next, some APIs and documentation define or refer to an older (and thus shorter) word-length than the full word length on the CPU that software may be compiled for. Also, similar to how bytes are used for small numbers in many programs, a shorter word (16 or 32 bits) may be used in contexts where the range of a wider word is not needed (especially where this can save considerable stack space or cache memory space). For example, Microsoft's Windows API maintains the programming language definition of WORD as 16 bits, despite the fact that the API may be used on a 32- or 64-bit x86 processor, where the standard word size would be 32 or 64 bits, respectively. Data structures containing such different sized words refer to them as:
An example with a different word size is the IBM System/360 family. In the System/360 architecture, System/370 architecture and System/390 architecture, there are 8-bit bytes, 16-bit halfwords, 32-bit words and 64-bit doublewords. The z/Architecture, which is the 64-bit member of that architecture family, continues to refer to 16-bit halfwords, 32-bit words, and 64-bit doublewords, and additionally features 128-bit quadwords.
In general, new processors must use the same data word lengths and virtual address widths as an older processor to have binary compatibility with that older processor.
Often carefully written source code – written with source-code compatibility and software portability in mind – can be recompiled to run on a variety of processors, even ones with different data word lengths or different address widths or both.
1837 | Charles Babbage Analytical engine | w | Five different cards were used for different functions, exact size of cards not known. | w | |||
1941 | Zuse Z3 | w | w | ||||
1942 | ABC | w | |||||
1944 | Harvard Mark I | w | |||||
1946 (1948) {1953} | ENIAC (w/Panel #16) {w/Panel #26} | w, 2 w (w) {w} | (, , , ) | — — {w} | |||
1948 | Manchester Baby | w | w | w | |||
1951 | UNIVAC I | w | w | w | |||
1952 | IAS machine | w | w | w | |||
1952 | Fast Universal Digital Computer M-2 | w | = 4-bit opcode plus 3×10 bit address | ||||
1952 | IBM 701 | w, w | w | w, w | |||
1952 | UNIVAC 60 | n d | , ... | , | |||
1952 | ARRA I | w | w | w | |||
1953 | IBM 702 | n c | 0 c, ... 511 c | 5 c | c | ||
1953 | UNIVAC 120 | n d | , ... | , | |||
1953 | ARRA II | w | 2 w | w | w | ||
1954 (1955) | IBM 650 (w/IBM 653) | w | (w) | w | w | ||
1954 | IBM 704 | w | w | w | w | ||
1954 | IBM 705 | n c | 0 c, ... 255 c | 5 c | c | ||
1954 | IBM NORC | w | w, 2 w | w | w | ||
1956 | IBM 305 | n d | , ... | d | |||
1956 | ARMAC | w | w | w | w | , | |
1956 | LGP-30 | w | w | ||||
1958 | UNIVAC II | w | w | w | |||
1958 | SAGE | w | w | w | |||
1958 | Autonetics Recomp II | w, , , | 2 w | w | w, w | ||
1958 | ZEBRA | w, | 2w | w | w | ||
1958 | Setun | (~) | up to | up to | |||
1958 | Electrologica X1 | w | 2 w | w | w | , | |
1959 | IBM 1401 | n c | 1 c, ... | 1 c, 2 c, 4 c, 5 c, 7 c, 8 c | c | + wm | |
1959 (TBD) | IBM 1620 | n d | , ... | (, ... ) | d | ||
1960 | UNIVAC LARC | w, 2 w | w, 2 w | w | w | ||
1960 | CDC 1604 | w | w | w | w | ||
1960 | IBM 1410 | n c | 1 c, ... | 1 c, 2 c, 6 c, 7 c, 11 c, 12 c | c | + wm | |
1960 | IBM 7070 | w, 1- | w | w | w, d | ||
1960 | PDP-1 | w | w | w | |||
1960 | Elliott 803 | ||||||
1961 | IBM 7030 (Stretch) | , ... , , ... | w | w, w | bit (integer), w (branch), w (float) | , ... | |
1961 | IBM 7080 | n c | 0 c, ... 255 c | 5 c | c | ||
1962 | GE-6xx | w, 2 w | w, 2 w, | w | w | , | |
1962 | UNIVAC III | w, 2 w, 3 w, 4 w, , | w | w | |||
1962 | Autonetics D-17B Minuteman I Guidance Computer | , | w | ||||
1962 | UNIVAC 1107 | w, w, w, w | w | w | w | ||
1962 | IBM 7010 | n c | 1 c, ... | 1 c, 2 c, 6 c, 7 c, 11 c, 12 c | c | 6 b + wm | |
1962 | IBM 7094 | w | w, 2 w | w | w | ||
1962 | SDS 9 Series | w | 2 w | w | w | ||
1963 (1966) | Apollo Guidance Computer | w | w, 2 w | w | |||
1963 | Saturn Launch Vehicle Digital Computer | w | w | ||||
1964/ 1966 | PDP-6/PDP-10 | w | w, 2 w | w | w | (typical) | |
1964 | Titan | w | w | w | w | w | |
1964 | CDC 6600 | w | w | w, w | w | ||
1964 | Autonetics D-37C Minuteman II Guidance Computer | , | w | , | |||
1965 | Gemini Guidance Computer | , 26 | bit | ||||
1965 | IBM 1130 | w, 2w | 2w, 3w | w, 2w | w | ||
1965 | IBM System/360 | w, w, , ... | w, 2 w | w, w, 1 w | |||
1965 | UNIVAC 1108 | w, w, w, w, w, 2 w | w, 2 w | w | w | , | |
1965 | PDP-8 | w | w | w | |||
1965 | Electrologica X8 | w | 2 w | w | w | , | |
1966 | SDS Sigma 7 | w, w | w, 2 w | w | |||
1969 | Four-Phase Systems AL1 | w | ? | ? | ? | ||
1970 | MP944 | w | ? | ? | ? | ||
1970 | PDP-11 | w | 2 w, 4 w | w, 2 w, 3 w | |||
1971 | CDC STAR-100 | w, w | w, w | w, wbit | |||
1971 | TMS1802NC | w | ? | ? | |||
1971 | Intel 4004 | w, d | 2 w, 4 w | w | |||
1972 | Intel 8008 | w, | w, 2 w, 3 w | w | |||
1972 | Calcomp 900 | w | w, 2 w | w | |||
1974 | Intel 8080 | w, 2 w, | w, 2 w, 3 w | w | |||
1975 | ILLIAC IV | w | w, w | w | w | ||
1975 | Motorola 6800 | w, | w, 2 w, 3 w | w | |||
1975 | MOS Tech. 6501 MOS Tech. 6502 | w, | w, 2 w, 3 w | w | |||
1976 | Cray-1 | , w | w | w, w | w | ||
1976 | Zilog Z80 | w, 2 w, | w, 2 w, 3 w, 4 w, 5 w | w | |||
1976 | Signetics 8X300 | w | 16 bit | w | 1-8 bit | ||
1978 (1980) | 16-bit x86 (Intel 8086) (w/floating point: Intel 8087) | w, w, | (2 w, 4 w, 5 w, ) | w, w, ... 7 w | |||
1978 | VAX | w, w, w, , ... , , ... | w, 2 w | w, ... 14 w | |||
1979 (1984) | Motorola 68000 series (w/floating point) | w, w, w, | ( w, 2 w, 2 w) | w, w, ... 7 w | |||
1985 | IA-32 (Intel 80386) (w/floating point) | w, w, w | ( w, 2 w, ) | , ... w ... 3 w | |||
1985 | ARM architecture | w, w | w | ||||
1985 | MIPS I | w, w, w | w, 2 w | w | |||
1991 | Cray C90 | , w | w | w, w, | w | ||
1992 | DEC Alpha | , w, w, w | w, w | w | |||
1992 | PowerPC | w, w, w | w, 2 w | w | |||
1996 | ARM architecture (w/ARM Thumb) | w, w, w | w ( w, w) | ||||
2000 | IBM z/Architecture | , w, w, w , ... | w, w, 2 w | w, w, w | , UTF-16, UTF-32 | ||
2001 | IA-64 | , w, w, w | w, w | (in 128-bit bundles) | |||
2001 | ARMv6 (w/VFP) | , w, w | (w, 2w) | w, w | |||
2003 | x86-64 | , w, w, w | w, w, | , ... | |||
2013 | ARMv8-A and ARMv9-A | , w, w, w | w, w | w | |||
|
|